home *** CD-ROM | disk | FTP | other *** search
- /*rx
- * SpellCheckWord.rexx --- program to spell check a word using the ISpell
- * server and do some fancy magic with GUISpell if the word is incorrectly
- * spelled.
- *
- * Something like the following works great in VLT 5.517 (27.3.92) or
- * later (enter without line breaks into Operation/Mouse Support...):
- *
- * ~rx ("move %X %Y"; "extr reviewlineatcursor"; "move %x %y";
- * s = " "vlt.reviewlineatcursor" "; a = lastpos(" ",s,%X+1);
- * b = pos(" ",s,%X+1); "move "a b-1 %Y %Y;
- * address command "spellcheckword" substr(s,a,b-a) "VLT")
- *
- * Thanks Willy for adding the features needed to do the above in VLT!
- *
- * Copyright © 1992 Loren J. Rittle
- * Use as you will, just document your changes and keep my copyright
- * notice intact. Feel free to mail enhancements to me.
- *
- * Loren J. Rittle
- * rittle@comm.mot.com
- * Wed May 13 05:56:10 1992
- */
-
- options results
-
- if left(address(), 4) ~== 'WSH_' then
- address command
-
- parse arg word PublicScreen .
-
- if ~show(ports, 'IRexxSpell') then
- do
- 'run <nil: >nil: ispell -r >nil: <nil:'
- waitforport 'IRexxSpell'
- end
-
- address 'IRexxSpell' quickcheck word
- if result = 'bad' then
- do
- if ~show(ports, 'GUISpell') then
- do
- 'run <nil: >nil: GUISpell <nil: >nil:'
- waitforport 'GUISpell'
- end
- if show(ports, 'GUISpell') then
- do
- if PublicScreen ~= '' then
- address 'GUISpell' jump PublicScreen
- address 'GUISpell' check word
- end
- else
- address 'PingServer' beep
- end
-
- exit 0
-